$(document).ready(function () {
    $.getJSON("fontend.php?class=userlib&action=history",function(data){
        $.each(data,function(i,item){
            $('#tbhistory').append('<tr><th>'+(i+1)+'</th><td>'+item.book+'</td><td>'+item.action+'</td><td>'+item.time+'</td></tr>');
        });
    });
    $.getJSON("fontend.php?class=userlib&action=numrent",function(data){
        $('#bkcntdata').text(data.count);
    });
    $.getJSON("fontend.php?class=userlib&action=numhistory",function(data){
        $('#historydata').text(data.count);
    });
});

